package com.int_tech.mession.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Administrator on 2017/9/20.
 * 电子锁任务
 */
@Entity
@Table(name = "c_mession")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class Mession {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //任务编号
    @Column(length = 64)
    private String messionNumber;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createTime;

    //修改时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    //装车开始时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date startOpenDoorTime;

    //卸车结束时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date startCloseDoorTime;

    //装车结束时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date endOpenDoorTime;
   // 卸车结束时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date endCloseDoorTime;
    //车辆编号
    @Column(length = 64)
    private  String carNumber;

    //任务编号递增码
    @Column(length = 8)
    private int messionCount;

    //是否完成：,0，未完成；1，已完成
    private int isOver;

    //装载率
    private String rate;

    //装载率数据
    private String rateDataString;

    //始发地
    private String startAddress;

    //目的地
    private String endAddress;

    //是否同步了时间状态数据(0,未同步处理；1，已同步处理）
    private int isAnsyCarTime;

    //装载率信息的创建任务标识
    private String isInMession;

    //异常任务(0,正常；1,异常）
    private int yiChang;

    //2，代表以获取终点位置;1,为已更新起点坐标;3,代表任务路线绘制完成
    @Column(length = 8)
    private int checkStatus;
}
